<template>
     <el-table-column v-if="column" v-bind="column" align="center">
          <template #default="scope" v-show="!column.children">
               <slot :name="column.slotName" :row="scope.row">
                    {{ scope.row[column.prop] ? scope.row[column.prop] : '-' }}
               </slot>
          </template>
          <template
               #default="scope"
               v-if="column.children && column.children.length"
          >
               <RecursiveTableColumn
                    v-if="column.children && column.children.length"
                    v-for="child in column.children"
                    :key="child.prop"
                    :column="child"
               />
          </template>
     </el-table-column>
</template>
<script>
export default {
     name: 'RecursiveTableColumn',
     props: {
          column: {
               type: Object,
               required: true,
          },
     },
}
</script>
